<?php
$controller = 'annonce';
$view = 'index';

if(isset($_GET['controller'])) {
    $controller = $_GET['controller'];
}

if(isset($_GET['view'])) {
    $view = $_GET['view'];
}

require 'controller/'.$controller.'.php';

$currentController = 'Controller\\'.ucfirst($controller).'Controller';
$currentView = $view.'View';

$myController = new $currentController();
$myController->$currentView();
